<div class="quarter first bg_greenyellow round_10 shadow_in_0">
    <ul class="rightmenu">
        <li><a href="<?php echo $this->url(array('action'=>'index','controller'=>'users','module'=>'admin'),null,true); ?>">Wszyscy</a></li>
        <li><a href="<?php echo $this->url(array('action'=>'index','controller'=>'users','module'=>'admin','scope'=>'users'),null,true); ?>">Użytkownicy</a></li>          
        <li><a href="<?php echo $this->url(array('action'=>'index','controller'=>'users','module'=>'admin','scope'=>'admins'),null,true); ?>">Administratorzy</a></li>          
    </ul>

</div>

<div class="threequarter last fixed ">
    
    
     
    
    <h6 class ="round_5 shadow_out_4 bg_mediumblue"><? echo 'Lista '.$this->scope?></h6>
    <br /> 
    
<table class="datalist" width="100%">
   <caption>
       <? echo 'Lista '.$this->scope?>
   </caption>
   <thead>
      <tr>
         <th>Nazwa</th>
         <th scope="col">Rola</th>
         <th scope="col">Kontakt</th>
         <th scope="col"></th>

      </tr>
   </thead>
   <tfoot>
      <tr>
         <th>&nbsp;</th>
         <th>&nbsp;</th>
         <td>&nbsp;</td>
         <td>&nbsp;</td>

      </tr>
   </tfoot>
   <tbody>
       <?php foreach($this->users as $user){ ?>
      <tr>
         <th scope="row"><?php echo $user->getLogin(); ?></th>
         <td><?php if($user->getRole() == 'admin'){
             echo 'Administrator';
         } elseif ($user->getRole() == 'user') {
             echo 'Użytkownik';
         }  else {
             echo 'Użytkownik';
         }
?></td>
         <td><?php echo  $user->getEmail();?></td>
         <td><a class="styled_button grey view_button" href='<?php echo $this->url(array('action'=>'edit','controller'=>'users','module'=>'admin','id'=>$user->getLogin()),null,true); ?>'>Więcej</a></td>
      </tr> 
      <?php } ?>

    
   </tbody>
    
</table>
    <br />
    <?php echo $this->paginationControl($this->users,
                                    'Sliding',
                                    'utility/my_paginator_helper.phtml'); ?>
    
</div>